package com.fanjj.spark.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fanjj.spark.SparkApplication;
import com.fanjj.spark.entity.TaskEntity;
import com.fanjj.spark.services.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.List;


public class test   {
//
//    @Autowired
//    private  TaskApi taskApi;
//    @Autowired
//  private TaskService taskService;

    public  static void main(String[] args){

        //启动WEB项目
        SpringApplication application = new SpringApplication(SparkApplication.class);
        ConfigurableApplicationContext context = application.run(args);
        TaskApi taskApi = context.getBean(TaskApi.class);


        QueryWrapper<TaskEntity> query = new QueryWrapper<>();
        query.eq("taskid",1);
        //List<TaskEntity> list     = taskService.list(query);

        TaskEntity task = taskApi.getTaskById("1");
    }

}
